package controller

import (
	"parking-lot-go-admin/model/admin"

	"github.com/gin-gonic/gin"
)

func Routers(c *gin.Context) {

	adminId, _ := c.Get("admin_id")

	//查询身份组
	var adminWithGroupStruct admin.AdminWithGroupStruct
	returnData, err := adminWithGroupStruct.GetUserRoles(adminId)
	if err != nil {
		Fail(c, err.Error())
		return
	}

	Success(c, returnData)
}
